#include <iostream>
#include <cstring>

struct Student
{
    void InitStu(int ID,const char* Name)
    {
        id = ID;
        name = strdup(Name);
    }
    int id;
    char *name;
};
//结构体名等于类型名
//可以在结构体内定义函数
using Stu = Student;

int main()
{
    Student s ;
    s.InitStu(1,"zhangsan");
    std::cout << s.id<<" "<<s.name<<std::endl;

    return 0;
}